home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / include / unistd.h < prev    next >
C/C++ Source or Header  |  1996-01-30  |  4KB  |  144 lines

  1. /* This file may have been modified by DJ Delorie (Jan 1991).  If so,
  2. ** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave,
  3. ** Rochester NH, 03867-2954, USA.
  4. */
  5.  
  6. #ifndef unistd_h
  7. #define unistd_h 1
  8.  
  9. #include <sys/fcntl.h>
  10.  
  11. /* A safe-looking set of things from various system versions */
  12.  
  13. #ifndef SEEK_SET
  14. #define SEEK_SET 0
  15. #endif
  16.  
  17. #ifndef SEEK_CUR
  18. #define SEEK_CUR 1
  19. #endif
  20.  
  21. #ifndef SEEK_END
  22. #define SEEK_END 2
  23. #endif
  24.  
  25. #ifndef GF_PATH
  26. #define GF_PATH "/etc/group"
  27. #endif
  28.  
  29. #ifndef PF_PATH
  30. #define PF_PATH "/etc/passwd"
  31. #endif
  32.  
  33. #ifndef IN_PATH
  34. #define IN_PATH "/usr/include"
  35. #endif
  36.  
  37. #ifndef R_OK
  38. #define R_OK 4
  39. #endif
  40.  
  41. #ifndef W_OK
  42. #define W_OK 2
  43. #endif
  44.  
  45. #ifndef X_OK
  46. #define X_OK 1
  47. #endif
  48.  
  49. #ifndef F_OK
  50. #define F_OK 0
  51. #endif
  52.  
  53. #ifndef NULL
  54. #define NULL 0
  55. #endif
  56.  
  57. #ifndef F_ULOCK
  58. #define F_ULOCK 0
  59. #endif
  60.  
  61. #ifndef F_LOCK
  62. #define F_LOCK 1
  63. #endif
  64.  
  65. #ifndef F_TLOCK
  66. #define F_TLOCK 2
  67. #endif
  68.  
  69. #ifndef F_TEST
  70. #define F_TEST 3
  71. #endif
  72.  
  73. #ifdef    __cplusplus
  74. extern "C" {
  75. #endif
  76. extern long    sysconf(int);
  77. extern long    pathconf(const char *, int);
  78. extern long    fpathconf(int, int);
  79. #ifdef    __cplusplus
  80. }
  81. #endif
  82.  
  83. /* Miscellaneous constants */
  84. #define _POSIX_VERSION        199009L
  85. #define    _POSIX2_VERSION        198909L
  86. #define    _POSIX2_C_BIND        1    /* Not sure what this means */
  87. #define    _POSIX2_C_DEV        -1
  88. #define    _POSIX2_FORT_DEV    -1
  89. #define    _POSIX2_SW_DEV        -1
  90. #define    _XOPEN_VERSION        3
  91.  
  92. /* sysconf() values from POSIX.1 */
  93. #define    _SC_ARG_MAX        0    /* Max length of arg to exec() */
  94. #define    _SC_CHILD_MAX        1    /* Max processes per userid */
  95. #define    _SC_CLK_TCK        2    /* Number of clock ticks per second */
  96. #define    _SC_NGROUPS_MAX        3    /* Max group IDs per process */
  97. #define    _SC_OPEN_MAX        4    /* Max open files per process */
  98. #define    _SC_JOB_CONTROL        5    /* POSIX job control supported */
  99. #define    _SC_SAVED_IDS        6    /* POSIX saved IDs supported */
  100. #define    _SC_VERSION        7    /* Date of POSIX.1 */
  101. /* sysconf() values from POSIX.1-1990 */
  102. #define    _SC_STREAM_MAX        100    /* Max open stdio FILEs */
  103. #define    _SC_TZNAME_MAX        101    /* Max length of timezone name */
  104. /* sysconf() values from POSIX.2 */
  105. #define    _SC_BC_BASE_MAX        200    /* Largest ibase & obase for bc */
  106. #define    _SC_BC_DIM_MAX        201    /* Max array elements for bc */
  107. #define    _SC_BC_SCALE_MAX    202    /* Max scale value for bc */
  108. #define    _SC_COLL_ELEM_MAX    203    /* Max bytes in collation element */
  109. #define    _SC_EXPR_NEST_MAX    204    /* Max nesting of (...) for expr */
  110. #define    _SC_LINE_MAX        205    /* Max length in bytes of input line */
  111. #define    _SC_PASTE_FILES_MAX    206    /* Max file operands for paste */
  112. #define    _SC_RE_DUP_MAX        207    /* Max regular expressions permitted */
  113. #define    _SC_SED_PATTERN_MAX    208    /* Max size of bytes of sed pattern */
  114. #define    _SC_SENDTO_MAX        209    /* Max bytes of message for sendto */
  115. #define    _SC_SORT_LINE_MAX    210    /* Max bytes of input line for sort */
  116. #define    _SC_2_VERSION        211    /* Current version of POSIX.2 */
  117. #define    _SC_2_C_BIND        212    /* C Language Bindings Option */
  118. #define    _SC_2_C_DEV        213    /* C Development Utilities Option */
  119. #define    _SC_2_FORT_DEV        214    /* FORTRAN Dev. Utilities Option */
  120. #define    _SC_2_SW_DEV        215    /* Software Dev. Utilities Option */
  121. /* sysconf() values from X/Open */
  122. #define    _SC_XOPEN_VERSION    8    /* Issue of XPG */
  123. #define    _SC_PASS_MAX        9    /* Max bytes in password */
  124. #define    _SC_CLOCKS_PER_SEC    2000    /* Units/sec of clock() */
  125. /* sysconf() values from OSF */
  126. #define    _SC_AES_OS_VERSION    3000    /* Version of OSF/AES OS */
  127. #define    _SC_PAGE_SIZE        3001    /* Software page size */
  128. #define    _SC_ATEXIT_MAX        3002    /* Max atexit() funcs */
  129.  
  130. /* pathconf() values from POSIX.1 */
  131. #define    _PC_LINK_MAX        0    /* Max links to a single file */
  132. #define    _PC_MAX_CANON        1    /* Max bytes in TTY canonical input */
  133. #define    _PC_MAX_INPUT        2    /* Max bytes in TTY input queue */
  134. #define    _PC_NAME_MAX        3    /* Max bytes in a filename */
  135. #define    _PC_PATH_MAX        4    /* Max bytes in a pathname */
  136. #define    _PC_PIPE_BUF        5    /* Max bytes for atomic pipe writes */ 
  137. #define    _PC_CHOWN_RESTRICTED    6    /* Only privileged user can chown() */
  138. #define    _PC_NO_TRUNC        7    /* Error when NAME_MAX exceeded */
  139. #define    _PC_VDISABLE        8    /* Char disables TTY editing chars */
  140.  
  141. #endif
  142.  
  143.  
  144.